const baseUrl = 'http://192.168.2.203:18680'
const request = (url = '', data = {},method = 'POST',) => {
	return new Promise((resolve, reject) => {
		uni.request({
			method: method,
			url: baseUrl + url,
			data,
			header:{
				token: 'CA47326337484C0CAF1E50101A4447C1'
			},
			dataType: 'json',
		}).then((response) => {
			let [error, res] = response;
			resolve(res.data);
		}).catch(error => {
			let [err, res] = error;
			reject(err)
		})
	});
}
export default request
